package grpc.rpcserver;

import grpc.rpcprotocol.service.DepartmentService;
import grpc.rpcprotocol.service.UserService;
import grpc.rpcserver.service.impl.DepartmentServiceImpl;
import grpc.rpcserver.service.impl.UserServiceImpl;

import java.io.IOException;

/**
 * @Author: admin
 * @Description:
 * @Date: 2018/9/28 15:40
 */

public class RpcServerTest {
    public static void main(String[] args){
        RpcServer rpcServer=new RpcServer(9999);
        rpcServer.registryService(UserService.class, UserServiceImpl.class);
        rpcServer.registryService(DepartmentService.class, DepartmentServiceImpl.class);
        try {
            rpcServer.start();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}